﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace VehicleScale.Models
{
    public class CompanyInfoModel : ModelBase
    {
        #region Properties
        //private Guid _companyID;
        //public Guid CompanyID
        //{
        //    get { return _companyID; }
        //    set
        //    {
        //        if (_companyID != value)
        //        {
        //            _companyID = value;
        //        }
        //    }
        //}

        private string _companyName = String.Empty;
        public string CompanyName
        {
            get { return string.IsNullOrEmpty(_companyName) ? String.Empty : _companyName; }
            set
            {
                if (_companyName != value)
                {
                    _companyName = value;
                }
            }
        }

        private string _address = String.Empty;
        public string Address
        {
            get { return string.IsNullOrEmpty(_address) ? String.Empty : _address; }
            set
            {
                if (_address != value)
                {
                    _address = value;
                }
            }
        }

        private string _telephone = String.Empty;
        public string Telephone
        {
            get { return string.IsNullOrEmpty(_telephone) ? String.Empty : _telephone; }
            set
            {
                if (_telephone != value)
                {
                    _telephone = value;
                }
            }
        }

        private string _faxNumber = String.Empty;
        public string FaxNumber
        {
            get { return string.IsNullOrEmpty(_faxNumber) ? String.Empty : _faxNumber; }
            set
            {
                if (_faxNumber != value)
                {
                    _faxNumber = value;
                }
            }
        }

        private string _taxCode = String.Empty;
        public string TaxCode
        {
            get { return string.IsNullOrEmpty(_taxCode) ? String.Empty : _taxCode; }
            set
            {
                if (_taxCode != value)
                {
                    _taxCode = value;
                }
            }
        }

        private byte[] _logoImage;
        public byte[] LogoByte
        {
            get { return _logoImage; }
            set
            {
                if (_logoImage != value)
                {
                    _logoImage = value;
                }
            }
        }

        public Image LogoImage
        {
            get { return Common.ConvertToImage(_logoImage); }
            set {
                _logoImage = Common.ConvertToByte(value);
            }
        }

        #endregion
    }
}
